﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WF.DAL;

namespace WF.Model
{
    public class KQApplyEntity : EntityBase<KQApply>
    {
        #region 构造函数
        public KQApplyEntity() : base() { }
        public KQApplyEntity(KQApply kq) : base(kq) { }
        #endregion

        #region 自定义字段
        private string holidayTypeCode;//假期类型编号
        private string holidayTypeSubCode;//假期子类型编号
        private string empLevel;//员工等级
        private string dateTimeFrom;//请假开始时间包括分钟
        private string dateTimeTo;//请假结束时间包括分钟
        private string auditorPositionID;//审评人编号
        private string email;//电子邮件
        private string _HolidayIdentify; //申请的假期类型标识：如病假BJ，事假SJ等等
        private string _DeptCode;  //当前申请人所在的部门路径
        private string provePersonAccount;  //证明人域账号
        //private string 
        #endregion


        #region 实现属性
        public override string ID
        {
            get { return DbEntity.RowID; }
            set { DbEntity.RowID = value; this.SendPropertyChanged("RowID"); }
        }


        public override string DisplayName
        {
            get { return DbEntity.RowID; }
        }
        #endregion


        #region DB关联的字段



        /// <summary>
        /// 申请假期类型名称
        /// </summary>
        public string HoliDayTypeName
        {
            get { return DbEntity.HolidayTypeName; }
            set { DbEntity.HolidayTypeName = value; this.SendPropertyChanged("ApplyTypeName"); }
        }

        /// <summary>
        ///申请人公司账号 
        /// </summary>
        public string ApplyAccount
        {
            get { return DbEntity.ApplyAccount; }
            set { DbEntity.ApplyAccount = value; this.SendPropertyChanged("ApplyAccount"); }
        }

        /// <summary>
        /// 申请假期子类型名称
        /// </summary>
        public string HoliDayTypeSubName
        {
            get { return DbEntity.HolidayTypeNameSub; }
            set { DbEntity.HolidayTypeNameSub = value; this.SendPropertyChanged("ApplyTypeNameSub"); }
        }

        /// <summary>
        /// 申请假期开始时间
        /// </summary>
        public DateTime ApplyDateFrom
        {
            get { return DbEntity.ApplyDateFrom; }
            set { DbEntity.ApplyDateFrom = value; this.SendPropertyChanged("ApplyDateFrom"); }
        }

        /// <summary>
        ///申请结束时间
        /// </summary>
        public DateTime ApplyDateTo
        {
            get { return DbEntity.ApplyDateTo; }
            set { DbEntity.ApplyDateTo = value; this.SendPropertyChanged("ApplyDateTo"); }
        }

        /// <summary>
        /// 请假总小时数
        /// </summary>
        public double ApplyHours
        {
            get { return DbEntity.ApplyHours; }
            set { DbEntity.ApplyHours = value; this.SendPropertyChanged("ApplyHours"); }
        }

        /// <summary>
        /// 请假总天数
        /// </summary>
        public double ApplyDays
        {
            get { return DbEntity.ApplyDays; }
            set { DbEntity.ApplyDays = value; this.SendPropertyChanged("ApplyDays"); }
        }

        /// <summary>
        /// 申请时间
        /// </summary>
        public DateTime ApplyRegisterDate
        {
            get { return DbEntity.ApplyRegisterDate; }
            set { DbEntity.ApplyRegisterDate = value; this.SendPropertyChanged("ApplyRegisterDate"); }
        }

        /// <summary>
        /// 请假原因
        /// </summary>
        public string ApplyReason
        {
            get { return DbEntity.ApplyReason; }
            set { DbEntity.ApplyReason = value; this.SendPropertyChanged("ApplyReason"); }
        }

        /// <summary>
        /// 申请人姓名
        /// </summary>
        public string ApplicantName
        {
            get { return DbEntity.ApplicantName; }
            set { DbEntity.ApplicantName = value; this.SendPropertyChanged("ApplicantName"); }
        }

        /// <summary>
        /// 申请人所在部门名称
        /// </summary>
        public string DeptName
        {
            get { return DbEntity.DeptName; }
            set { DbEntity.DeptName = value; this.SendPropertyChanged("DeptName"); }
        }

        /// <summary>
        /// 请假开始小时
        /// </summary>
        public string HourFrom
        {
            get { return DbEntity.HourFrom; }
            set { DbEntity.HourFrom = value; this.SendPropertyChanged("HourFrom"); }
        }

        /// <summary>
        /// 请假结束小时
        /// </summary>
        public string HourTo
        {
            get { return DbEntity.HourTo; }
            set { DbEntity.HourTo = value; this.SendPropertyChanged("HourTo"); }
        }

        /// <summary>
        /// 请假开始分钟
        /// </summary>
        public string MinuteFrom
        {
            get { return DbEntity.MinuteFrom; }
            set { DbEntity.MinuteFrom = value; this.SendPropertyChanged("MinuteFrom"); }
        }

        /// <summary>
        /// 请假结束分钟
        /// </summary>
        public string MinuteTo
        {
            get { return DbEntity.MinuteTo; }
            set { DbEntity.MinuteTo = value; this.SendPropertyChanged("MinuteTo"); }
        }

        /// <summary>
        /// 申请人公司账号
        /// </summary>
        public string RegisterAccount
        {
            get { return DbEntity.RegisterAccount; }
            set { DbEntity.RegisterAccount = value; this.SendPropertyChanged("RegisterAccount"); }
        }

        /// <summary>
        /// 申请人公司名称
        /// </summary>
        public string RegisterName
        {
            get { return DbEntity.RegisterName; }
            set { DbEntity.RegisterName = value; this.SendPropertyChanged("RegisterName"); }
        }


        /// <summary>
        /// 流程信息
        /// </summary>
        public string Folio
        {
            get { return DbEntity.Folio; }
            set { DbEntity.Folio = value; this.SendPropertyChanged("Folio"); }
        }

        /// <summary>
        /// 申请单状态
        /// </summary>
        public int FlowState
        {
            get { return Convert.ToInt32(DbEntity.FlowState); }
            set { DbEntity.FlowState = value; this.SendPropertyChanged("FlowState"); }
        }

        /// <summary>
        /// 证明人域账号
        /// </summary>
        public string ProvePersonAccount
        {
            get { return DbEntity.ProvePersonAccount; }
            set { DbEntity.ProvePersonAccount = value; this.SendPropertyChanged("ProvePersonAccount"); }
        }

        #endregion

        #region K2保存字段
        /// <summary>
        /// 申请假期类型编号
        /// </summary>
        public string HolidayTypeCode
        {
            get { return holidayTypeCode; }
            set { holidayTypeCode = value; }
        }
        /// <summary>
        ///  申请假期子类型编号
        /// </summary>
        public string HolidayTypeSubCode
        {
            get { return holidayTypeSubCode; }
            set { holidayTypeSubCode = value; }
        }

        /// <summary>
        /// 员工等级
        /// </summary>
        public string EmpLevel
        {
            get { return empLevel; }
            set { empLevel = value; }
        }

        /// <summary>
        /// 请假开始时间(包括时和分钟)
        /// </summary>
        public string DateTimeFrom
        {
            get { return dateTimeFrom; }
            set { dateTimeFrom = value; }
        }

        /// <summary>
        /// 请假结束时间(包括时和分钟)
        /// </summary>
        public string DateTimeTo
        {
            get { return dateTimeTo; }
            set { dateTimeTo = value; }
        }

        /// <summary>
        /// 审评人职位编号
        /// </summary>
        public string AuditorPositionID
        {
            get { return this.auditorPositionID; }
            set { this.auditorPositionID = value; }
        }

        /// <summary>
        /// 电子邮件
        /// </summary>
        public string Email
        {
            get { return email; }
            set { email = value; }
        }

        public string HolidayIdentify
        {
            get { return _HolidayIdentify; }
            set { _HolidayIdentify = value; }
        }
        public string DeptCode
        {
            get { return _DeptCode; }
            set { _DeptCode = value; }
        }
        #endregion
    }
}
